//
//  BaseModel.m
//  App架构Simple
//
//  Created by 胡锦涛 on 2019/2/16.
//  Copyright © 2019 胡锦涛. All rights reserved.
//

#import "BaseModel.h"

@implementation BaseModel

-(void)setValue:(id)value forKey:(NSString *)key
{
    
    if ([value isKindOfClass:[NSNumber class]]) {
        value = [NSString stringWithFormat:@"%@",value];
    }else if ([value isKindOfClass:[NSNull class]]){
        value = @"";
    }else if ([value isKindOfClass:[NSString class]]){
        if ([(NSString *)value containsString:@"<null>"]) {
            value = @"";
        }
        if ([(NSString *)value containsString:@"(null)"]) {
            value = @"";
        }
    }
    [super setValue:value forKey:key];
}

-(void)setValue:(id)value forUndefinedKey:(NSString *)key
{
    
}
@end
